A compiler is a program that translates source code written in a high-level programming language into a lower-level language, such as intermediate level code (e.g., bytecode, Common Language Infrastructure (CIL), etc.) and/or machine code (i.e., native code, object code). An Ahead-of-Time (AOT) compiler translates the source code of a program into machine code before the program executes. The AOT compiler performs static analyses on the program that are beneficial for catching errors before the program executes and to perform optimizations aimed at reducing the execution speed of the program.
A Just-In-Time (JIT) compiler translates the intermediate level code into machine code at runtime. During program execution, a language virtual machine translates the intermediate level code into machine code instructions. JIT compilation is used to support dynamic features of a programming language, such as reflection, run time type checking, and late binding, that rely on the current program state. The dynamic features provide greater flexibility by enabling extensions to the program and modifications to the type system at runtime but at the expense of bearing an increased execution time of the program.